﻿using System;

namespace ExpressesClass.StoApi.Util
{
    public class ConfigUrl
    {
        public static String GetUrl(String appName)
        {
            switch (appName)
            {
                case "CREATE":
                    return "https://cloudinter-linkgateway.sto.cn/gateway/link.do";
                case "CANCEL":
                    return "https://cloudinter-linkgateway.sto.cn/gateway/link.do";
                case "STOCK":
                    return "https://cloudinter-linkgateway.sto.cn/gateway/link.do";
                case "TRACE":
                    return "https://cloudinter-linkgateway.sto.cn/gateway/link.do";
                default:
                    return "";
            }
        }

        //测试
        //public static String GetUrl(String appName)
        //{
        //    switch (appName)
        //    {
        //        case "CREATE":
        //            return "http://cloudinter-linkgatewaytest.sto.cn/gateway/link.do";
        //        case "CANCEL":
        //            return "http://cloudinter-linkgatewaytest.sto.cn/gateway/link.do";
        //        case "STOCK":
        //            return "http://cloudinter-linkgatewaytest.sto.cn/gateway/link.do";
        //        case "TRACE":
        //            return "http://cloudinter-linkgatewaytest.sto.cn/gateway/link.do";
        //        default:
        //            return "";
        //    }
        //}

        public static String GetApiName(String appName)
        {
            switch (appName)
            {
                case "CREATE":
                    return "OMS_EXPRESS_ORDER_CREATE";
                case "CANCEL":
                    return "EDI_MODIFY_ORDER_CANCEL";
                case "STOCK":
                    return "BILL_CODE_QUERY_USER_STOCK";
                case "TRACE":
                    return "STO_TRACE_QUERY_COMMON";
                default:
                    return "";
            }
        }

        public static String GetKeyName(String appName)
        {
            switch (appName)
            {
                case "CREATE":
                    return "sto_oms";
                case "CANCEL":
                    return "edi_modify_order";
                case "STOCK":
                    return "billcode_open";
                case "TRACE":
                    return "sto_trace_query";
                default:
                    return "";
            }
        }
    }
}
